#pragma once

// CLibraryTreeCtrl

class CFileLibraryDoc;

class CLibraryTreeCtrl : public CTreeCtrl
{
	DECLARE_DYNAMIC(CLibraryTreeCtrl)

public:
	CLibraryTreeCtrl(CFileLibraryDoc* doc, LPCTSTR selectLibrary = NULL);
	virtual ~CLibraryTreeCtrl();

	bool DeleteSelectItem();
	void AddItem(CString& name, CString& rule);
	void SelectSpecifyItem();
	CMapStringToString libraryMap;
protected:
	CFileLibraryDoc* m_doc;
	CString m_preSelectLibrary;
	HTREEITEM m_preSelectItem;
	virtual void PreSubclassWindow();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	afx_msg void OnTvnBeginlabeledit(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnTvnEndlabeledit(NMHDR *pNMHDR, LRESULT *pResult);
	DECLARE_MESSAGE_MAP()
};